import React, { useState, useEffect } from 'react'
import { View, Image, Text } from '@tarojs/components'
import './index.scss'

export default (props) => {
  const { imgUrl, title, description, name, watchNum } = props

  return (
    <View className="video-card">
      <Image
        style="width: 30%;height: 100px; marginRight: 5%"
        src={imgUrl}
        // mode="left"
      />
      <View className="video-text">
        <Text className="title">{title}</Text>
        <Text className="desc">{'简介:' + description}</Text>
        <Text className="name">{'up主名称:' + name}</Text>
        <Text className="watch-num">{'播放量' + (watchNum / 10000).toFixed(1) + '万'}</Text>
      </View>
    </View>
  )
}
